home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13221 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: ix.netcom.com!news
  2. From: jlilley@ix.netcom.com (John Lilley)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Can someone help a beginner?
  5. Date: 24 Mar 1996 05:30:06 GMT
  6. Organization: Netcom
  7. Message-ID: <4j2mku$j4l@dfw-ixnews4.ix.netcom.com>
  8. References: <4isjtr$j4r@morgoth.sfu.ca>
  9. NNTP-Posting-Host: den-co25-11.ix.netcom.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-NETCOM-Date: Sat Mar 23 11:30:06 PM CST 1996
  13. X-Newsreader: WinVN 0.99.7
  14.  
  15. In article <4isjtr$j4r@morgoth.sfu.ca>, kubo@news.sfu.ca says...
  16. >
  17. >        I need to know if there are procedures that make getting the
  18. >current date, and calculating future dates easy. I'm using a Unix C
  19. >compiler. I've so far found the function ctime that will return the
  20. >date as string but I'm looking for a function that will allow me to
  21. >easily calculate future dates. Is there such function built into the
  22. >language or do I need to implement that by myself?
  23.  
  24. Check out the "struct tm" family of functions, especially mktime(),
  25. because that is the function that allows you to do date arithmetic
  26. by "normalizing" dates.
  27.  
  28. john lilley
  29.  
  30.